<template>
<div class="auth-wrapper d-flex no-block justify-content-center align-items-center bg-dark">
  <div class="auth-box bg-dark border-top border-secondary">
    <div id="loginform">
      <div class="text-center p-t-20 p-b-20">
        <span class="db"><img src="../assets/images/logo.png" alt="logo" /></span>
      </div>
    </div>
  </div>
</div>
</template>

<script>
  import $ from 'jquery'
  import cfg from '../dist/js/config'
  export default {
    props: {
      name: String,
      code: String
    },
    created() {
      $.get(cfg.serverPath + '/admin/auth?name=' + this.name + '&code=' + this.code,
        result => {
          if (result.status != 0) {
            $(document).failMsg(result.message)
            return
          }
          this.$router.push('/')
        }
      )
    }
  }
</script>
<style>
</style>